# plugins/gui_plugin/SConstruct
import os
from SCons.Script import *

Import('build_dir') # 导入 build_dir 变量

env = Environment()

# 定义插件配置
plugin_config = {
    "window_width": 800,
    "window_height": 600
}

plugin_src_files = Glob('*.c')

# 构建动态链接库 (插件)
plugin_name = os.path.splitext(os.path.basename(str(plugin_src_files[0])))[0]
plugin = env.SharedLibrary(os.path.join(build_dir, 'plugins', plugin_name), plugin_src_files, SHLIBPREFIX='')

# 返回插件对象和配置
Return(plugin=plugin, config=plugin_config)
